import Vue from 'vue'
import VueRouter from 'vue-router'
import UI from '../views/UI.vue'
import Contacts from '../views/Contacts.vue'
import About from '../views/About.vue'
import AllContacts from '../views/child/AllContacts.vue'
import Alice from '../views/child/Alice.vue'
import Bob from '../views/child/Bob.vue'
import Blog from '../views/child/children/Blog.vue'
import Fax from '../views/child/children/Fax.vue'
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: UI
    },
    {
        path: '/ui',
        component: UI,
    },
    {
        path: '/contacts',
        component: Contacts,
        children: [
            {
                path: 'allcontacts',
                component: AllContacts
            },
            {
                path: 'alice',
                component: Alice
            },
            {
                path: 'bob',
                component: Bob,
                children: [
                    {
                        path: 'blog',
                        component: Blog
                    },
                    {
                        path: 'fax',
                        component: Fax
                    },
                ]
            }
        ]
    },
    {
        path: '/about',
        component: About
    },
]

const router = new VueRouter({
    routes
})



export default router